aux_source_directory(./diskIO DIR_LIB_SRCS)
aux_source_directory(./imagehost_global DIR_LIB_SRCS)
aux_source_directory(./luaWrapper DIR_LIB_SRCS)
aux_source_directory(./luaWrapper/lua5.3 DIR_LIB_SRCS)
aux_source_directory(./record DIR_LIB_SRCS)
aux_source_directory(./common DIR_LIB_SRCS)
aux_source_directory(./ipc DIR_LIB_SRCS)
aux_source_directory(./ DIR_LIB_SRCS)

aux_source_directory(./playback DIR_LIB_SRCS)
aux_source_directory(./algo_ctrl DIR_LIB_SRCS)

include_directories(./)
include_directories(./include)
include_directories(./playback)
include_directories(./record)
include_directories(./ipc)
include_directories(./luaWrapper/lua5.3)
include_directories(./imagehost_global)
include_directories(./algo_ctrl)

#串口源码
set(SerialPort_COMMON ./CSerialPort/SerialPort.cpp ./CSerialPort/SerialPortBase.cpp ./CSerialPort/SerialPortInfo.cpp ./CSerialPort/SerialPortInfoBase.cpp)
if(WIN32)
message("SerialPort_SRC WIN32 ")
set(SerialPort_SRC  ./CSerialPort/SerialPortInfoWinBase.cpp ./CSerialPort/SerialPortWinBase.cpp)
elseif() 
message("SerialPort_SRC unix ")
set(SerialPort_SRC ./CSerialPort/SerialPortInfoUnixBase.cpp ./CSerialPort/SerialPortUnixBase.cpp)
endif()
add_definitions(-DHAVE_serial_port)


# 设置${PROJECT_BINARY_DIR} = +build， 设置库文件输出路径
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
#add_library(mod STATIC ${DIR_LIB_SRCS})

add_library(mod STATIC ${DIR_LIB_SRCS} ${SerialPort_COMMON} ${SerialPort_SRC} ${simulate_video})
